package com.ddwl.order.controller;

import com.ddwl.common.annotation.Submit;
import com.ddwl.common.feign.api.FundsApi;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 类OrderPayController.java的实现描述：支付相关接口
 *
 * @author zach
 * @Date :2020-06-02 17:03.
 */
@Api(tags = "支付相关接口")
@Slf4j
@RequestMapping("/pay")
@RestController
public class OrderPayController {

    @Resource
    private FundsApi fundsApi;


    @Submit
    @ApiOperation(value = "支付回调通知处理")
    @PostMapping("/wx/notify")
    public String parseOrderNotifyResult(@RequestBody String xmlData) {
        return fundsApi.wxNotifyResult(xmlData);
    }

}
